<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/core/common/taglibs.jsp" %>
<%@ include file="/WEB-INF/core/common/top.jsp" %>
<link rel="stylesheet" href="${ctx}/core/styles/jquery.cluetip.css" type="text/css" />
<script type='text/javascript' src='${ctx}/dwr/engine.js'> </script>
<script type='text/javascript' src='${ctx}/dwr/util.js'> </script>
<script type='text/javascript' src='${ctx}/dwr/interface/queryServiceUsing.js'> </script>
<script type='text/javascript' src='${ctx}/core/scripts/jquery.cluetip.js'> </script>
<script type="text/javascript">

    var intervalId;

    function changeFlashTime(flashTime){
        if(flashTime==''){
           flashTime='<s:property value="q_monitorFlash"/>';
        }
        if(flashTime==''){
           flashTime=-1;
        }
		if(flashTime>0){
		  flashTime = flashTime*1000;
		  intervalId = window.setInterval('reflash()',flashTime); 
	    }else{
	      if(intervalId!=null){
		      window.clearInterval(intervalId); 
	      }
	    }
    }
    
    function alertCaptionError(){
           alert('<s:text name='caption.import.failed'/>');
    }
    var $alex = jQuery.noConflict();
    
	$alex(function() {
		
		$alex('#q_endDate').datepick();
		$alex('#q_startDate').datepick();

	});
	
	

	$alex(document).ready(function() {
       $alex("a[name='showErrorLog']").cluetip(
		{
		  cluetipClass: 'jtip', 
		  arrows: true, 
		  dropShadow: true,
		  ajaxCache: false,
		  sticky: true,
		  height: '150px', 
		  mouseOutClose: true,
		  closePosition: 'title',
		  closeText: '<img src="${ctx}/core/images/imgs/close.png" alt="close" />'
		  }
       );
	});


    function delayFlesh(time){
       window.setTimeout( "reflash();",time*1000); 
    }
    function importCaption(id){
         //document.location.reload();
         //alert(id);
         window.open("<s:url value='/contentManage/contentCaption.action?act=monitorCaptionInput&contentId='/>"+id,"newwindow","height=250, width= 800, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
    }
	
    function obtainDatas(data){
              var isComplete="";
              var appendString="<table id='content' width='100%' border='0' cellpadding='0' cellspacing='1' bgcolor='#A6A6A6'>"+
	                                     "<tr> "+
	                                          " <td width='2%' align='center' height='20' class='table_head' width='1%'>"+
	                                          "<input type='checkbox' name='selectAll' value='checkbox' onClick='selectAllBox()' >"
	                                          +"</td> "+
	                                          " <td width='10%' align='center' height='20' class='table_head'>"+"<a href=\"javascript:sort('t.TITLE')\">"+"<s:text name='cep.vodAssertStatusMonitor.title'/>"+"</a>"+<s:if test="sortField=='t.TITLE'"><s:if test="sortMode=='asc'">"<font color=\"red\">↑</font>"+</s:if><s:else>"<font color=\"red\">↓</font>"+</s:else></s:if>"</td> "+
	                                          " <td width='10%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.contentId'/>"+"</td> "+
	                                          " <td width='4%' align='center' height='20' class='table_head'>"+"Site ID"+"</td> "+
	                                          " <td width='11%' align='center' height='20' class='table_head'>"+"<a href=\"javascript:sort('t.creation_date')\">"+"<s:text name='cep.vodAssertStatusMonitor.assetCreateDate'/>"+"</a>"+<s:if test="sortField=='t.creation_date'"><s:if test="sortMode=='asc'">"<font color=\"red\">↑</font>"+</s:if><s:else>"<font color=\"red\">↓</font>"+</s:else></s:if>"</td> "+
	                                          " <td width='5%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.assetStatus'/>"+"</td> "+
	                                          " <td width='6%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.captionStatus'/>"+"</td> "+
	                                          " <td width='5%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.imageStatus'/>"+"</td> "+
	                                          " <td width='5%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.transcodeStatus'/>"+"</td> "+
	                                          " <td width='7%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.analysisStatus'/>"+"</td> "+
	                                          " <td width='5%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.digestStatus'/>"+"</td> "+
	                                          " <td width='5%' align='center' height='20' class='table_head'>"+"<s:text name='cep.vodAssertStatusMonitor.publishStatus'/>"+"</td> "+
	                                     "</tr>";
	          //alert(data[0][5]);
              var captionStr = "";
	          for(i=0;i<data.length;i++){
	              if(data[i][10]==2){
		              appendString=appendString+"<tr><td height='20' class='tdBlue'><input type='checkbox' disabled='true' name='ids' value='"+data[i][1]+"'/></td> ";
	              }else{
		              appendString=appendString+"<tr><td height='20' class='tdBlue'><input type='checkbox' name='ids' value='"+data[i][1]+"'/></td> ";
	              }
	              if(data[i][5]==2&&(data[i][8]==-1||data[i][10]==2||data[i][10]==-1||(data[i][6]==-1&&data[i][7]==-1&&data[i][8]==0))){
				  
				     //alert(data[i][1]);
                     captionStr =" <img onClick=\"javascript:importCaption('"+data[i][1]+"');\" alt=\"<s:text name='cep.service.cpation.status.reflesh'/>\"  border=\"0\" style=\"CURSOR: hand\" src=\""+"${ctx}/core/images/import.gif\"/><s:text name='cep.service.status.complete'/>";
                     //alert(captionStr);
				  }
	              for(j=0;j<data[i].length;j++){ 
	                  if(j>3){
	                       if(data[i][4]=='3'){
	                       	  captionStr='';
	                       }
	                       if(j==5){
	                          if(captionStr!=''){
	                             //alert('asdfasdfasdfsdf');
	                             appendString=appendString+"<td height='20' class='tdBlue'>"+captionStr+"</td>";
				                  //appendString=appendString+"<td height='20' class='tdBlue'>"+data[i][j]+"</td>";
				                 captionStr='';
	                          }else{
	                              if(data[i][4]=='3'&&data[i][j]==-1){
				                  	appendString=appendString+"<td height='20' class='tdBlue'>"+getTrans(data[i][j],j,data[i][1])+"</td>";
	                              }else{
	                                 appendString=appendString+"<td height='20' class='tdBlue'>"+getTrans2(data[i][j],j,data[i][1])+"</td>";
	                              }
	                          }
	                       }else{
	                           appendString=appendString+"<td height='20' class='tdBlue'>"+getTrans(data[i][j],j,data[i][1])+"</td>";
	                       }
	                  }else{
			               appendString=appendString+"<td height='20' class='tdBlue'>"+data[i][j]+"</td>";
	                  }                      
			                                    
			      }  
			      appendString=appendString+"</tr> ";                        
		      }                              

	                                     
	           appendString=appendString+"</table>";
              
              $alex("#monitorAjax").html("");
	          $alex("#monitorAjax").append(appendString);
	          
				$alex(document).ready(function() {
			       $alex("a[name='showErrorLog']").cluetip(
					{
					  cluetipClass: 'jtip', 
					  arrows: true, 
					  dropShadow: true,
					  ajaxCache: false,
					  sticky: true,
					  height: '150px', 
					  mouseOutClose: true,
					  closePosition: 'title',
					  closeText: '<img src="${ctx}/core/images/imgs/close.png" alt="close" />'
					 }
			       );
				});
    }

    function reflash(){
         var pageNo = $alex("#toPageNo").val();
         var sortField = $alex("input[name='sortField']").val();
         var sortMode = $alex("input[name='sortMode']").val();
         
		 var arr=new Array();
		 var arr1=new Array(); 
         var q_title = $alex("input[name='q_title']").val();
		 
		 arr[0]=arr1;
		 arr[0][0]='q_title';
		 arr[0][1]=q_title;
         var q_assetStatus = $alex("input[name='q_assetStatus']").val();
         arr1=new Array(); 
		 arr[1]=arr1;
		 arr[1][0]='q_assetStatus';
		 arr[1][1]=q_assetStatus;
		 
         var q_captionStatus = $alex("input[name='q_captionStatus']").val();
         arr1=new Array(); 
		 arr[2]=arr1;
		 arr[2][0]='q_captionStatus';
		 arr[2][1]=q_captionStatus;
		 
         var q_digestStatus = $alex("input[name='q_digestStatus']").val();
         arr1=new Array(); 
		 arr[3]=arr1;
		 arr[3][0]='q_digestStatus';
		 arr[3][1]=q_digestStatus;
		 
         var q_imageStatus = $alex("input[name='q_imageStatus']").val();
         arr1=new Array(); 
		 arr[4]=arr1;
		 arr[4][0]='q_imageStatus';
		 arr[4][1]=q_imageStatus;
		 
         var q_transcodeStatus = $alex("input[name='q_transcodeStatus']").val();
         arr1=new Array(); 
		 arr[5]=arr1;
		 arr[5][0]='q_transcodeStatus';
		 arr[5][1]=q_transcodeStatus;
		 
         var q_analysisStatus = $alex("input[name='q_analysisStatus']").val();
         arr1=new Array(); 
		 arr[6]=arr1;
		 arr[6][0]='q_analysisStatus';
		 arr[6][1]=q_analysisStatus;
		 
         var q_publishStatus = $alex("input[name='q_publishStatus']").val();
         arr1=new Array(); 
		 arr[7]=arr1;
		 arr[7][0]='q_publishStatus';
		 arr[7][1]=q_publishStatus;
		 
         var q_startDate = $alex("input[name='q_startDate']").val();
         arr1=new Array(); 
		 arr[8]=arr1;
		 arr[8][0]='q_startDate';
		 arr[8][1]=q_startDate;
		 
         var q_endDate = $alex("input[name='q_endDate']").val();
         arr1=new Array(); 
		 arr[9]=arr1;
		 arr[9][0]='q_endDate';
		 arr[9][1]=q_endDate;



         queryServiceUsing.findQureyObjects("searchVodserviceMonitor",sortField,sortMode,arr,pageNo,10,obtainDatas);
    }


    function getTrans(status,statusType,contentId){
      var errorType = statusType -3;
      var errorTitle = getErrorTitle(errorType);
      var str = "<a name='showErrorLog' title='"+errorTitle+"' href='"+contentId+"' rel='vodContentLog.action?act=showVodErrorLog&q_contentId="+contentId+"&q_errorType="+errorType+"'><s:text name='cep.service.status.error'/></a>";
      if(status=='0')
        return '<s:text name="cep.service.status.wait"/>';
      if(status=='1')
        return '<s:text name="cep.service.status.deal"/>';
      if(status=='2')
        return '<s:text name="cep.service.status.complete"/>';
      if(status=='3'){
         if(statusType=='5'){
         	return '<s:text name="cep.service.status.caption.nofound"/>';
         }
         if(statusType=='4'){
         	return '<s:text name="cep.service.status.release"/>';
         }
      }
        
      if(status=='4')
        return '<s:text name="cep.service.status.caption.sure"/>';
        
      if(status=='-1'){
        return str;
      }
      if(status=='-3')
        return '<s:text name="cep.service.status.askretry"/>';
		
	}
	
	function getTrans2(status,statusType,contentId){
      
      var errorType = statusType -3;
      var errorTitle = getErrorTitle(errorType);
      var str = "<a name='showErrorLog' title='"+errorTitle+"' href='"+contentId+"' rel='vodContentLog.action?act=showVodErrorLog&q_contentId="+contentId+"&q_errorType="+errorType+"'><s:text name='cep.service.status.error'/></a>";
      if(status=='0')
        return '<s:text name="cep.service.status.wait"/>';
      if(status=='1')
        return '<s:text name="cep.service.status.deal"/>';
      if(status=='2')
        return '<s:text name="cep.service.status.complete"/>';
      if(status=='3'){
         if(statusType=='5'){
         	return '<s:text name="cep.service.status.caption.nofound"/>';
         }
         if(statusType=='4'){
         	return '<s:text name="cep.service.status.release"/>';
         }
      }
        
      if(status=='4')
        return '<s:text name="cep.service.status.caption.sure"/>';
        
      if(status=='-1'){
        if(statusType==5){
	          return "<img onClick=\"javascript:importCaption('"+contentId+"');\" alt=\"<s:text name='cep.service.cpation.status.reflesh'/>\"  border=\"0\" style=\"CURSOR: hand\" src=\""+"${ctx}/core/images/import.gif\"/>"+str;
        }
        
      }
      if(status=='-3')
        return '<s:text name="cep.service.status.askretry"/>';
      
      
      
      return str;
	}

    function getErrorTitle(statusType){
      //alert(statusType);
      if(statusType==1)
        return '<s:text name="cep.vodAssertStatusMonitor.assetStatus.errorlog"/>';
      if(statusType==2)
        return '<s:text name="cep.vodAssertStatusMonitor.captionStatus.errorlog"/>';
      if(statusType==3)
        return '<s:text name="cep.vodAssertStatusMonitor.imageStatus.errorlog"/>';
      if(statusType==4)
        return '<s:text name="cep.vodAssertStatusMonitor.transcodeStatus.errorlog"/>';
      if(statusType==5)
        return '<s:text name="cep.vodAssertStatusMonitor.analysisStatus.errorlog"/>';
      if(statusType==6)
        return '<s:text name="cep.vodAssertStatusMonitor.digestStatus.errorlog"/>';
      if(statusType==7)
        return '<s:text name="cep.vodAssertStatusMonitor.publishStatus.errorlog"/>';
		
	}
	
</script>
<script language="javascript">
  function selectAllBox(){
    var pids  = document.getElementsByName('ids');
    for (var i=0;i<pids.length;i++)
      {
         if(!pids[i].disabled){
             pids[i].checked = document.getElementById("selectAll").checked;
         }
       }
  }
  
  function doRecover(){
      var isSelect =false;
	  var pids  = document.getElementsByName('ids');
	  for (var i=0;i<pids.length;i++)
	  {
	     if(pids[i].checked){
		     isSelect=true;
		     break;
	     }
	  }
      if(isSelect){
         if (confirm('<s:text name="prompt.system.recover.sure"/>')){
		      var form = document.getElementById('mainForm');
		      document.getElementById('act').value='batchRecover';
		      form.action = 'vodAssertStatusMonitor.action';
		      form.submit();
			  return true;
         }
      }else{
         alert('<s:text name="prompt.system.recover.select"/>');
      }

  }
  
   function sort(_fieldName){
   		var fieldName = document.mainForm.sortField.value;
   		var sortMode='<s:property value="sortMode"/>';
   		if(_fieldName==fieldName){
	   		if('asc'=='<s:property value="sortMode"/>'){
	   		   document.mainForm.sortMode.value='desc';
	   		}
	   		if('desc'=='<s:property value="sortMode"/>'){
	   		   document.mainForm.sortMode.value='asc';
	   		}
   		}else{
   		    document.mainForm.sortField.value=_fieldName;
   		    document.mainForm.sortMode.value='asc';
   		}
   		document.mainForm.submit();
   }
</script>
<body style="overflow-x:hidden;overflow-y:auto;" <s:if test='q_monitorFlash!=null'> onload="changeFlashTime('');"</s:if>>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<%@include file="/WEB-INF/core/common/message.jsp"  %>
  <tr><td><table border="0" align="center" cellpadding="0" cellspacing="0">
    <td width="8" height="27"><img src="${ctx}/core/images/button_05.gif" width="8" height="27" /></td>
    <td width="99%" align="left" background="${ctx}/core/images/button_06.gif" class="bluecu">&nbsp;<img src="${ctx}/core/images/icon_04.gif" />&nbsp;<s:text name="cep.assertStatusMonitor.title"/></td>
    <td width="8"><img src="${ctx}/core/images/button_07.gif" width="8" height="27" /></td>
    </table>
    </td>
  </tr>
  
  <tr>
    <td colspan="3" class="biaoge">	
      <table width="100%" height="21" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
	        <td onClick="javascript:window.location='vodAssertStatusMonitor.action?act=query';">
	              <table cellpadding="0" cellspacing="0" width="100%" style="width:80px;cursor:hand;">
	                <tr>
	                  <td width="5"><img src="${ctx}/core/images/blue_left.gif" /></td>
	                  <td align="center" class="tab_button_blue" nowrap="nowrap">&nbsp;VOD&nbsp;</td>
	                  <td width="5"><img src="${ctx}/core/images/blue_right.gif" /></td>
	                </tr>
	            </table></td>
	         <td onClick="javascript:window.location='tvAssertStatusMonitor.action?act=query';">
	              <table cellpadding="0" cellspacing="0" width="100%" style="width:60px;cursor:hand;">
	                <tr>
	                  <td width="5" class="tab_underline1"><img src="${ctx}/core/images/gray_left.gif" /></td>
	                  <td align="center" class="tab_button_gray" nowrap="nowrap">&nbsp;TV&nbsp;</td>
	                  <td width="5" class="tab_underline1"><img src="${ctx}/core/images/gray_right.gif" /></td>
	                </tr>
	            </table></td>
	        <td width="90%" class="tab_underline1">&nbsp;</td>
         </tr>
      </table>
	<form name="mainForm" method="post" action="${ctx}/serviceManage/vodAssertStatusMonitor.action">  
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
        <td height="5"></td>
      </tr> 
    
	  <tr>
		<!-- 查询条件 -->
	    <td class="tabulation" ><div style="position:relative">
	      <div id="menu1"><img src="${ctx}/core/images/icon_13.gif"><s:text name="info.queryCondition" /></div>

	        <table width="100%" border="0" cellpadding="0" cellspacing="1" bordercolor="#FFFFFF">
		        	<input type="hidden" name="act" id="act" value="query"/>
					<input type="hidden" name="sortField" value="<s:property value='sortField'/>"/>
					<input type="hidden" name="sortMode" value="<s:property value='sortMode'/>"/>
			        <tr align="left">
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.title" /></td>
				        <td width="27%" bgcolor="#DDE4EA">
				            <exts:textfield id="q_title" name="q_title" value="%{q_title}" class="textbox_css" style="width:150px"/>
				        </td>
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.contentId" /></td>
				        <td bgcolor="#DDE4EA">
				            <exts:textfield id="q_assetId" name="q_assetId" value="%{q_assetId}" class="textbox_css" style="width:150px"/>
				        </td>				        
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.assetStatus" /></td>
				        <td bgcolor="#DDE4EA">
				            <select name="q_assetStatus">
				            	<option value=""></option>
				            	<option value="0" <s:if test='"0".equals(q_assetStatus)'>selected</s:if> ><s:text name="cep.service.status.wait" /></option>
				            	<option value="1" <s:if test='"1".equals(q_assetStatus)'>selected</s:if>><s:text name="cep.service.status.deal" /></option>
				            	<option value="2" <s:if test='"2".equals(q_assetStatus)'>selected</s:if>><s:text name="cep.service.status.complete" /></option>
				            	<option value="3" <s:if test='"3".equals(q_assetStatus)'>selected</s:if>><s:text name="cep.service.status.release" /></option>
				            	<option value="-1" <s:if test='"-1".equals(q_assetStatus)'>selected</s:if>><s:text name="cep.service.status.error" /></option>
				            	<option value="-3" <s:if test='"-3".equals(q_assetStatus)'>selected</s:if>><s:text name="cep.service.status.askretry" /></option>
				            </select>
				        </td>
				        
				    </tr> 
				    <tr align="left">
						<td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.captionStatus" /></td>
				        <td bgcolor="#DDE4EA">
				            <select name="q_captionStatus">
				            	<option value=""></option>
				            	<option value="0" <s:if test='"0".equals(q_captionStatus)'>selected</s:if>><s:text name="cep.service.status.wait" /></option>
				            	<option value="1" <s:if test='"1".equals(q_captionStatus)'>selected</s:if>><s:text name="cep.service.status.deal" /></option>
				            	<option value="2" <s:if test='"2".equals(q_captionStatus)'>selected</s:if>><s:text name="cep.service.status.complete" /></option>
				            	<option value="3" <s:if test='"3".equals(q_captionStatus)'>selected</s:if>><s:text name="cep.service.status.caption.nofound" /></option>
				            	<option value="4" <s:if test='"4".equals(q_captionStatus)'>selected</s:if>><s:text name="cep.service.status.caption.sure" /></option>
				            	<option value="-1" <s:if test='"-1".equals(q_captionStatus)'>selected</s:if>><s:text name="cep.service.status.error" /></option>
				            	<option value="-3" <s:if test='"-3".equals(q_captionStatus)'>selected</s:if>><s:text name="cep.service.status.askretry" /></option>
				            </select>
				        </td>				    
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.digestStatus" /></td>
				        <td bgcolor="#DDE4EA">
				            <select name="q_digestStatus">
				            	<option value=""></option>
				            	<option value="0" <s:if test='"0".equals(q_digestStatus)'>selected</s:if> ><s:text name="cep.service.status.wait" /></option>
				            	<option value="1" <s:if test='"1".equals(q_digestStatus)'>selected</s:if>><s:text name="cep.service.status.deal" /></option>
				            	<option value="2" <s:if test='"2".equals(q_digestStatus)'>selected</s:if>><s:text name="cep.service.status.complete" /></option>
				            	<option value="-1" <s:if test='"-1".equals(q_digestStatus)'>selected</s:if>><s:text name="cep.service.status.error" /></option>
				            	<option value="-3" <s:if test='"-3".equals(q_digestStatus)'>selected</s:if>><s:text name="cep.service.status.askretry" /></option>
				            </select>
				        </td>			    
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.imageStatus" /></td>
				        <td bgcolor="#DDE4EA">
				            <select name="q_imageStatus">
				                <option value=""></option>
				            	<option value="0" <s:if test='"0".equals(q_imageStatus)'>selected</s:if> ><s:text name="cep.service.status.wait" /></option>
				            	<option value="1" <s:if test='"1".equals(q_imageStatus)'>selected</s:if>><s:text name="cep.service.status.deal" /></option>
				            	<option value="2" <s:if test='"2".equals(q_imageStatus)'>selected</s:if>><s:text name="cep.service.status.complete" /></option>
				            	<option value="-1" <s:if test='"-1".equals(q_imageStatus)'>selected</s:if>><s:text name="cep.service.status.error" /></option>
				            	<option value="-3" <s:if test='"-3".equals(q_imageStatus)'>selected</s:if>><s:text name="cep.service.status.askretry" /></option>
				            </select>
				        </td>
				       
				        <!-- 
				         <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="metadata.releaseDate" /></td>
				        <td colspan=3 bgcolor="#DDE4EA">
				           
				        	<exts:date name="q_releaseDate" style="width:150px" />
				        </td>
				         -->
				    </tr> 

				    <tr align="left">	
 						<td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.transcodeStatus" /></td>
				        <td bgcolor="#DDE4EA">
				            <select name="q_transcodeStatus">
				            	<option value=""></option>
				            	<option value="0" <s:if test='"0".equals(q_transcodeStatus)'>selected</s:if> ><s:text name="cep.service.status.wait" /></option>
				            	<option value="1" <s:if test='"1".equals(q_transcodeStatus)'>selected</s:if>><s:text name="cep.service.status.deal" /></option>
				            	<option value="2" <s:if test='"2".equals(q_transcodeStatus)'>selected</s:if>><s:text name="cep.service.status.complete" /></option>
				            	<option value="-1" <s:if test='"-1".equals(q_transcodeStatus)'>selected</s:if>><s:text name="cep.service.status.error" /></option>
				            	<option value="-3" <s:if test='"-3".equals(q_transcodeStatus)'>selected</s:if>><s:text name="cep.service.status.askretry" /></option>
				            </select>
				        </td>				    			    
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.analysisStatus" /></td>
				        <td bgcolor="#DDE4EA">
				            <select name="q_analysisStatus">
				            	<option value=""></option>
				            	<option value="0" <s:if test='"0".equals(q_analysisStatus)'>selected</s:if> ><s:text name="cep.service.status.wait" /></option>
				            	<option value="1" <s:if test='"1".equals(q_analysisStatus)'>selected</s:if>><s:text name="cep.service.status.deal" /></option>
				            	<option value="2" <s:if test='"2".equals(q_analysisStatus)'>selected</s:if>><s:text name="cep.service.status.complete" /></option>
				            	<option value="-1" <s:if test='"-1".equals(q_analysisStatus)'>selected</s:if>><s:text name="cep.service.status.error" /></option>
				            	<option value="-3" <s:if test='"-3".equals(q_analysisStatus)'>selected</s:if>><s:text name="cep.service.status.askretry" /></option>
				            </select>
				        </td>
				        <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="cep.vodAssertStatusMonitor.publishStatus" /></td>
				        <td bgcolor="#DDE4EA">
				            <select name="q_publishStatus">
				            	<option value=""></option>
				            	<option value="0" <s:if test='"0".equals(q_publishStatus)'>selected</s:if> ><s:text name="cep.service.status.wait" /></option>
				            	<option value="1" <s:if test='"1".equals(q_publishStatus)'>selected</s:if>><s:text name="cep.service.status.deal" /></option>
				            	<option value="2" <s:if test='"2".equals(q_publishStatus)'>selected</s:if>><s:text name="cep.service.status.complete" /></option>
				            	<option value="-1" <s:if test='"-1".equals(q_publishStatus)'>selected</s:if>><s:text name="cep.service.status.error" /></option>
				            	<option value="-3" <s:if test='"-3".equals(q_publishStatus)'>selected</s:if>><s:text name="cep.service.status.askretry" /></option>
				            </select>
				        </td>
				        <!-- 
				         <td width="3%" bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="metadata.releaseDate" /></td>
				        <td colspan=3 bgcolor="#DDE4EA">
				           
				        	<exts:date name="q_releaseDate" style="width:150px" />
				        </td>
				         -->
				    </tr>
    		        <tr>
				        <td height="20"  bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="MultiSelectAddDate.startTime" />
				        </td>
				        <td bgcolor="#DDE4EA" nowrap="nowrap">
				           <input type="text" id="q_startDate" name="q_startDate" value="<s:property value='q_startDate'/>" class="textbox_css" style="width:150px"/>
				        </td>
				        <td height="20"  bgcolor="#DDE4EA" nowrap="nowrap">&nbsp;&nbsp;<s:text name="MultiSelectAddDate.endTime" />
				        </td>
				        <td height="20"  colspan="3" bgcolor="#DDE4EA" nowrap="nowrap">
				           <input type="text" id="q_endDate" name="q_endDate" value="<s:property value='q_endDate'/>" class="textbox_css" style="width:150px"/>
				        </td>

			        </tr>		       
    		        <tr>
			        	<td height="20" colspan="6" align="right" bgcolor="#DDE4EA">
						   <input type="submit" class="btn" name="quary" value="<s:text name='button.query' />" />
				        </td>
			        </tr>		       
		       
			</table> </div></td>
	<!-- 查询条件结束 -->

  </tr>
  <tr>
    <td height="5"></td>
  </tr>
  <tr>
    <td height="10" background="${ctx}/core/images/line5.gif"></td>
    </tr>
	      <tr>
	        <td  align="left">
		        <input type="button" name="del" value="<s:text name="button.recover" />" class="btn" onClick="doRecover();">
		        <select name="q_monitorFlash" id="q_monitorFlash" onChange="changeFlashTime(this.value);">
		             <option value="-1"><s:text name='cep.vodAssertStatusMonitor.flashmanual'/></option>
		             <option value="5" <s:if test="q_monitorFlash==5">selected</s:if>>5s</option>
		             <option value="10" <s:if test="q_monitorFlash==10">selected</s:if>>10s</option>
		             <option value="20" <s:if test="q_monitorFlash==20">selected</s:if>>20s</option>
		             <option value="30" <s:if test="q_monitorFlash==30">selected</s:if>>30s</option>
		        </select>
	        </td>
	      </tr>
	       <tr>
    <td height="5"></td>
  </tr> 
	      </table>
      <div id="monitorAjax">
      <table id="content" width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#A6A6A6">
        
        <tr bgcolor="#C7D6EA">
          <td  width="2%" height="20" align="center" class="table_head">
               <span>
           		 <input type="checkbox" name="selectAll" value="checkbox" onClick="selectAllBox();" >
           	  </span>
          </td>
          <td width="10%" align="center" class="table_head" ><a href="javascript:sort('t.TITLE')"><s:text name="cep.vodAssertStatusMonitor.title" /></a><s:if test="sortField=='t.TITLE'"><s:if test="sortMode=='asc'"><font color="red">↑</font></s:if><s:else><font color="red">↓</font></s:else></s:if></td>
          <td width="10%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.contentId" /></td>
          <td width="4%" align="center" class="table_head">Site ID</td>
          <td width="11%" align="center" class="table_head"><a href="javascript:sort('t.creation_date')"><s:text name="cep.vodAssertStatusMonitor.assetCreateDate" /></a><s:if test="sortField=='t.creation_date'"><s:if test="sortMode=='asc'"><font color="red">↑</font></s:if><s:else><font color="red">↓</font></s:else></s:if></td>
          <td width="5%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.assetStatus" /></td>
          <td width="6%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.captionStatus" /></td>
          <td width="5%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.imageStatus" /></td>
          <td width="5%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.transcodeStatus" /></td>
          <td width="7%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.analysisStatus" /></td>
          <td width="5%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.digestStatus" /></td>
          <td width="5%" align="center" class="table_head"><s:text name="cep.vodAssertStatusMonitor.publishStatus" /></td>
        </tr>
 		
 		<s:iterator value="pageInfo.searchResult" id="it" status="st">
	        <tr>
				<td align="center" class="tdBlue">
				     <input type="checkbox" name="ids" value="<exts:property value='1'/>" <s:if test='"2".equals(#it[10])'>disabled="true"</s:if>/>
				</td>
				<td class="tdBlue" align="center"><exts:property value="0"/></td>
				<td class="tdBlue" align="center"><exts:property value="1"/></td>
				<td class="tdBlue" align="center"><exts:property value="2"/></td>
				<td class="tdBlue" align="center"><exts:property value="3"/></td>
				<td class="tdBlue" align="center">
					<s:if test='"0".equals(#it[4])'><s:text name="cep.service.status.wait"/></s:if>
					<s:if test='"1".equals(#it[4])'><s:text name="cep.service.status.deal"/></s:if>
					<s:if test='"2".equals(#it[4])'><s:text name="cep.service.status.complete"/></s:if>
					<s:if test='"3".equals(#it[4])'><s:text name="cep.service.status.release"/></s:if>
					<s:if test='"-1".equals(#it[4])'><a name="showErrorLog" title="<s:text name='cep.vodAssertStatusMonitor.assetStatus.errorlog'/>" href="<exts:property value='1'/>" rel="vodContentLog.action?act=showVodErrorLog&q_contentId=<exts:property value='1'/>&q_errorType=1"><s:text name="cep.service.status.error"/></a></s:if>
					<s:if test='"-3".equals(#it[4])'><s:text name="cep.service.status.askretry"/></s:if>

	            </td>
				<td class="tdBlue" align="center">
					<s:if test='"0".equals(#it[5])'><s:text name="cep.service.status.wait"/></s:if>
					<s:if test='"1".equals(#it[5])'><s:text name="cep.service.status.deal"/></s:if>
					
					<s:if test='"2".equals(#it[5])'>
					      <s:if test='!"3".equals(#it[4])&&"-1".equals(#it[8])||("2".equals(#it[10])||"-1".equals(#it[10])||("-1".equals(#it[6])&&"-1".equals(#it[7])&&"0".equals(#it[8])))'>
					             <img onclick="javascript:importCaption('<exts:property value="1"/>')" alt="<s:text name='cep.service.cpation.status.reflesh'/>"  border="0" style="CURSOR: hand" src="${ctx}/core/images/import.gif"/> <s:text name="cep.service.status.complete"/>
					      </s:if>
					      
					      <s:else>
					             <s:text name="cep.service.status.complete"/>
					      </s:else>
					</s:if>
					<s:if test='"3".equals(#it[5])'><s:text name="cep.service.status.caption.nofound"/></s:if>
					<s:if test='"4".equals(#it[5])'><s:text name="cep.service.status.caption.sure"/></s:if>
					<s:if test='"-1".equals(#it[5])'>
						<s:if test='!"3".equals(#it[4])'>
						     <img onclick="javascript:importCaption('<exts:property value="1"/>')" alt="<s:text name='cep.service.cpation.status.reflesh'/>"  border="0" style="CURSOR: hand" src="${ctx}/core/images/import.gif"/>
					    </s:if>
					         <a name="showErrorLog" title="<s:text name='cep.vodAssertStatusMonitor.captionStatus.errorlog'/>" href="<exts:property value='1'/>" rel="vodContentLog.action?act=showVodErrorLog&q_contentId=<exts:property value='1'/>&q_errorType=2"><s:text name="cep.service.status.error"/></a></s:if>
					<s:if test='"-3".equals(#it[5])'><s:text name="cep.service.status.askretry"/></s:if>
				</td>
				<td class="tdBlue" align="center">
					<s:if test='"0".equals(#it[6])'><s:text name="cep.service.status.wait"/></s:if>
					<s:if test='"1".equals(#it[6])'><s:text name="cep.service.status.deal"/></s:if>
					<s:if test='"2".equals(#it[6])'><s:text name="cep.service.status.complete"/></s:if>
					<s:if test='"-1".equals(#it[6])'><a name="showErrorLog" title="<s:text name='cep.vodAssertStatusMonitor.imageStatus.errorlog'/>" href="<exts:property value='1'/>" rel="vodContentLog.action?act=showVodErrorLog&q_contentId=<exts:property value='1'/>&q_errorType=3"><s:text name="cep.service.status.error"/></a></s:if>
					<s:if test='"-3".equals(#it[6])'><s:text name="cep.service.status.askretry"/></s:if>
				</td>
				<td class="tdBlue" align="center">
					<s:if test='"0".equals(#it[7])'><s:text name="cep.service.status.wait"/></s:if>
					<s:if test='"1".equals(#it[7])'><s:text name="cep.service.status.deal"/></s:if>
					<s:if test='"2".equals(#it[7])'><s:text name="cep.service.status.complete"/></s:if>
					<s:if test='"-1".equals(#it[7])'><a name="showErrorLog" title="<s:text name='cep.vodAssertStatusMonitor.transcodeStatus.errorlog'/>" href="<exts:property value='1'/>" rel="vodContentLog.action?act=showVodErrorLog&q_contentId=<exts:property value='1'/>&q_errorType=4"><s:text name="cep.service.status.error"/></a></s:if>
					<s:if test='"-3".equals(#it[7])'><s:text name="cep.service.status.askretry"/></s:if>
				</td>
				<td class="tdBlue" align="center">
					<s:if test='"0".equals(#it[8])'><s:text name="cep.service.status.wait"/></s:if>
					<s:if test='"1".equals(#it[8])'><s:text name="cep.service.status.deal"/></s:if>
					<s:if test='"2".equals(#it[8])'><s:text name="cep.service.status.complete"/></s:if>
                    <s:if test='"-1".equals(#it[8])'><a name="showErrorLog" title="<s:text name='cep.vodAssertStatusMonitor.analysisStatus.errorlog'/>" href="<exts:property value='1'/>" rel="vodContentLog.action?act=showVodErrorLog&q_contentId=<exts:property value='1'/>&q_errorType=5"><s:text name="cep.service.status.error"/></a></s:if>
					<s:if test='"-3".equals(#it[8])'><s:text name="cep.service.status.askretry"/></s:if>
				</td>
				<td class="tdBlue" align="center">
					<s:if test='"0".equals(#it[9])'><s:text name="cep.service.status.wait"/></s:if>
					<s:if test='"1".equals(#it[9])'><s:text name="cep.service.status.deal"/></s:if>
					<s:if test='"2".equals(#it[9])'><s:text name="cep.service.status.complete"/></s:if>
					<s:if test='"-1".equals(#it[9])'><a name="showErrorLog" title="<s:text name='cep.vodAssertStatusMonitor.digestStatus.errorlog'/>" href="<exts:property value='1'/>" rel="vodContentLog.action?act=showVodErrorLog&q_contentId=<exts:property value='1'/>&q_errorType=6"><s:text name="cep.service.status.error"/></a></s:if>
					<s:if test='"-3".equals(#it[9])'><s:text name="cep.service.status.askretry"/></s:if>
				</td>
				<td class="tdBlue" align="center">
					<s:if test='"0".equals(#it[10])'><s:text name="cep.service.status.wait"/></s:if>
					<s:if test='"1".equals(#it[10])'><s:text name="cep.service.status.deal"/></s:if>
					<s:if test='"2".equals(#it[10])'><s:text name="cep.service.status.complete"/></s:if>
					<s:if test='"-1".equals(#it[10])'><a name="showErrorLog" title="<s:text name='cep.vodAssertStatusMonitor.publishStatus.errorlog'/>" href="<exts:property value='1'/>" rel="vodContentLog.action?act=showVodErrorLog&q_contentId=<exts:property value='1'/>&q_errorType=7"><s:text name="cep.service.status.error"/></a></s:if>
					<s:if test='"-3".equals(#it[10])'><s:text name="cep.service.status.askretry"/></s:if>
				</td>
	          
	        </tr>
	    </s:iterator>
      </table>
      </div>
	 

      <!-- 分页 -->	  
		  <table width="100%" border="0" cellspacing="0" cellpadding="0">
		  </form>
              <tr><td>${pagination}</td></tr>
          </table>
          
      <!-- 分页结束 -->	
    </td></tr></table>
</body>

<script>
	tables('content',null);
</script>